home *** CD-ROM | disk | FTP | other *** search
/ Complete Internet Archive / Complete Internet Archive.iso / Winsock Libraries / ipack(2).exe / FTPGLOB.BAS < prev    next >
Encoding:
BASIC Source File  |  1996-12-10  |  1.2 KB  |  48 lines

  1. Option Explicit
  2.  
  3. Attribute VB_Name = "ftpglob"
  4. Dim SelectedServerFile As String
  5.  
  6. Sub SetSelectedServerFile(s As String)
  7.     SelectedServerFile = s
  8. End Sub
  9. Function GetSelectedServerFile() As String
  10.     GetSelectedServerFile = SelectedServerFile
  11. End Function
  12. Sub ClearListDir()
  13.     MainForm.listDir.Clear
  14.     SelectedServerFile = ""
  15. End Sub
  16. Function GetCurrentFilename() As String
  17.     Dim s As String
  18.     Dim i As Integer
  19.     
  20.     If (MainForm.listDir.ListIndex = -1) Then
  21.         GetCurrentFilename = ""
  22.     Else
  23.         s = MainForm.listDir.list(MainForm.listDir.ListIndex)
  24.         i = Len(s)
  25.         Do While (Mid(s, i - 1, 1) <> " ")
  26.             i = i - 1
  27.         Loop
  28.         GetCurrentFilename = Mid(s, i)
  29.     End If
  30. End Function
  31.  
  32. Sub Trace(list As ListBox, msg As String)
  33.     Dim crpos As Integer
  34.            
  35.     crpos = InStr(msg, vbCrLf)
  36.     If (crpos = 0) Then
  37.         msg = msg & vbCrLf
  38.         crpos = InStr(msg, vbCrLf)
  39.     End If
  40.     Do While (crpos > 0)
  41.         list.AddItem Left(msg, crpos - 1)
  42.         list.ListIndex = list.NewIndex
  43.         msg = Mid(msg, crpos + 2)
  44.         crpos = InStr(msg, vbCrLf)
  45.     Loop
  46. End Sub
  47.  
  48.